package com.onlineExam.question.domain;

import java.math.BigDecimal;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.onlineExam.common.annotation.Excel;
import com.onlineExam.common.core.domain.BaseEntity;

/**
 * 题库管理对象 question
 * 
 * @author amy
 * @date 2025-05-30
 */
public class Question extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 所属课程 */
    @Excel(name = "所属课程")
    private Long courseId;

    /** 题型 */
    @Excel(name = "题型")
    private Integer type;

    /** 题目内容 */
    @Excel(name = "题目内容")
    private String content;

    /** 正确答案（JSON格式） */
    @Excel(name = "正确答案", readConverterExp = "J=SON格式")
    private String correctAnswer;

    /** 题目分数 */
    @Excel(name = "题目分数")
    private BigDecimal score;

    /** 题目选项信息 */
    private List<Option> optionList;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setCourseId(Long courseId) 
    {
        this.courseId = courseId;
    }

    public Long getCourseId() 
    {
        return courseId;
    }

    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setCorrectAnswer(String correctAnswer) 
    {
        this.correctAnswer = correctAnswer;
    }

    public String getCorrectAnswer() 
    {
        return correctAnswer;
    }

    public void setScore(BigDecimal score) 
    {
        this.score = score;
    }

    public BigDecimal getScore() 
    {
        return score;
    }

    public List<Option> getOptionList()
    {
        return optionList;
    }

    public void setOptionList(List<Option> optionList)
    {
        this.optionList = optionList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("courseId", getCourseId())
            .append("type", getType())
            .append("content", getContent())
            .append("correctAnswer", getCorrectAnswer())
            .append("score", getScore())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("optionList", getOptionList())
            .toString();
    }
}
